#include <iostream>
#include <sys/types.h> 
#include <sys/stat.h>
#include <unistd.h>
#include <cstring>
#include <fcntl.h>

using namespace std;

int main()
{
  //cout << "hello client" << endl;
  int fd = open("./fifo", O_WRONLY);
  if(fd < 0)
  {
    cerr << "open failed" << endl;
    return -1;
  }

  const char* buffer = "hello world";
  write(fd, buffer, strlen(buffer));


  return 0;
}
